﻿@model IEnumerable<Scorpicore.Models.Track>

<h2>Следи</h2>

@(Html.Kendo().Grid(Model)
    .Name("administration-tracks-grid")
    .Columns(columns =>
            {
                columns.Bound(p => p.Id);
                columns.Bound(p => p.Banknote.Letters);
                columns.Bound(p => p.Banknote.SerialNumber);
                columns.Bound(p => p.Place.Name).Title("Град");
                columns.Bound(p => p.Message);
                columns.Bound(p => p.Date);
                columns.Template(@<text>
       @Html.ActionLink("Промяна", "Edit", new { id = item.Id })
                </text>);
                columns.Template(@<text>
        @Html.ActionLink("Изтриване", "Delete", new { id = item.Id })
                </text>);
                columns.Template(@<text>
       @Html.ActionLink("Детайли", "Details", new { id = item.Id })
                </text>);
            })
                .Pageable()
                .Filterable()
                .DataSource(dataSource => dataSource
                    .Server()
                    .Read(read => read.Action("Index", "TracksAdministration"))
                .PageSize(10)))

<p>
    @Html.ActionLink("Създай нова", "Create")
</p>